package com.wms.mapper;

import com.wms.dto.AllocateSaveVo;
import com.wms.dto.AllocatedetailVo;
import com.wms.dto.AuditAllocateDTO;
import com.wms.entity.Allocate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AllocateMapper {


    String selectMaxCode();

    /**
     * 查询所有调度内容
     * @return
     */
    List<Allocate> select(AllocatedetailVo allocatedetailVo);
    /**
     * 逻辑删除
     */
    int updateStatus(int id);

    /**
     * 物理删除
     */
    int deleteById(int id);

    /**
     * 保存调度单
     */
    int insert(AllocateSaveVo allocateSaveVo);


    /**
     * 更改操作
     */
    int updateAllocateById(AllocateSaveVo allocateSaveVo);


    /**
     * 一对多
     */
    List<Allocate> selectAll();

    /**
     * 审核更改
     */
    int updateAuditStatus(@Param("auditStatus") Integer auditStatus ,@Param("note") String note,@Param("orderId")Integer orderId);


    /**
     * 查询所有仓库名字
     */
    List<String> selectWarehouse();

    /**
     * 审核完调拨入库查询调拨单和调拨明细，用于转换
     */
   Allocate  selectAllocateWithDetails(int id);


}
